import { SearchParams, SearchResType, SrearchType } from '@/types/data'
import http from '@/utils/http'
import { MyAxiosPromise } from '.'
// 搜索补全
export function suggestion (q: string): MyAxiosPromise<SrearchType> {
  return http({ url: 'suggestion', method: 'get', params: { q } })
}
// 搜索结果
export function search (params: SearchParams): MyAxiosPromise<SearchResType> {
  return http({ url: 'search', method: 'get', params })
}
